package com.kob.backend.controller;

import com.kob.backend.service.sell.GetShopidByProductid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class GetShopidController {
    @Autowired
    private GetShopidByProductid getShopidByProductid;
    @GetMapping("/sell/getshopid/")
    public Map<String,String> getshopid(@RequestParam Map<String,String> map){
        Integer productid=Integer.parseInt(map.get("productid"));
        return getShopidByProductid.getshopid(productid);
    }
}
